<ui:composition template="#{WAMUSER eq null ? '/WEB-INF/templates/public-template.xhtml' : '/WEB-INF/templates/main-template.xhtml'}"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:param name="pageName" value="" />

	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
		<h:panelGroup style="width: 100%; text-align: left;">
			<h:outputText value="E-Form" styleClass="outputTextTitle" />
			<p:spacer />
			<p:spacer />
			<p:spacer />
			<p:spacer />
			<p:spacer />
			<h:outputText value="(To be filled by new joinee) " styleClass="outputTextTitleDesc" />
		</h:panelGroup>
		<h:form id="formData">
		<p:ajaxStatus onstart="statusDialog.show();"
				onsuccess="statusDialog.hide();" />

			<p:dialog modal="true" widgetVar="statusDialog" showHeader="false"
				draggable="false" closable="false">
				<p:graphicImage
					value="/resources/styles/images/ajax-loading-bar.gif" />
			</p:dialog>
			<p:wizard widgetVar="wiz" flowListener="#{eformBean.onFlowProcess}" >
				<p:tab id="personal" title="Personal Details">
					<h:panelGrid columns="2" style="border:1 px solid #d9d9d9;">
						<h:panelGrid columns="6"
							style="borer:1px solid #d9d9d9;" cellpadding="6" cellspacing="6">

							<f:facet name="header">
								<h:outputLabel value="Personal Details"
									styleClass="outputTextTitleDesc" /> 
									
							</f:facet>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="First Name" />
							<p:inputText value="#{eformBean.newJoinee.firstName}" />
                            <h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Last Name" />
							<p:inputText value="#{eformBean.newJoinee.lastName}" />
							<h:inputHidden/>
							<h:outputLabel value="Gender" />
							<h:panelGroup>
								<p:selectOneMenu value="#{eformBean.newJoinee.gender}"
									style="width: 156px;">
									<p:ajax event="change" listener="#{eformBean.genderOnChangeListner}" process="@this" ></p:ajax>
									<f:selectItem itemLabel="Male" itemValue="Male" />
									<f:selectItem itemLabel="Female" itemValue="Female" />
								</p:selectOneMenu>
							</h:panelGroup>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Date of Birth" />
							<h:panelGroup>
							<p:calendar pattern="dd-MMM-yyyy" yearRange="c-100:c+2" navigator="true"
								value="#{eformBean.newJoinee.dateofbirth}" readOnlyInputText="true"  maxlength="11" id="DOB">
                                 
                             </p:calendar>
                             <p:watermark value="DD-MMM-YYYY" for="DOB"></p:watermark>
                             </h:panelGroup>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Place of Birth" />
							<p:inputText value="#{eformBean.newJoinee.birthPlace}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Contact Number" />
							<p:inputMask value="#{eformBean.newJoinee.telephone}"
								mask="(999) 999-9999" />
							<h:outputLabel value="*" style="color : red;" />	
									<h:outputLabel value="Personal Email ID" />
							<h:panelGroup>
								<p:inputText value="#{eformBean.newJoinee.email}"
									id="personalEmail" />
								<p:watermark for="personalEmail" value="Ex: example@gmail.com"></p:watermark>
							</h:panelGroup>
							<h:inputHidden  />
							<h:outputLabel value="Alternate Email ID" />
							<h:panelGroup>
								<p:inputText value="#{eformBean.newJoinee.alternateEmail}"
									id="alternateEmailId" />
								<p:watermark value="Ex: example@gmail.com" for="alternateEmailId"></p:watermark>
							</h:panelGroup>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Primary Skill/Competency" />
							<p:inputText value="#{eformBean.newJoinee.primarySkill}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Nationality" />
							<p:inputText value="#{eformBean.newJoinee.nationality}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Citizenship" />
							<p:inputText value="#{eformBean.newJoinee.citizenship}" />
                             
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Father's Name" />
							<p:inputText value="#{eformBean.newJoinee.fathername}" />
							<h:outputLabel value="*" style="color : red;" /> 
							<h:outputLabel value="Mother's Name" />
							<p:inputText value="#{eformBean.newJoinee.motherName}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Mother's Maiden Name" />
							<p:inputText value="#{eformBean.newJoinee.mothermaidenName}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Marital Status" />
							<h:panelGroup>
								<p:selectOneMenu value="#{eformBean.newJoinee.maritalStatus}"
									style="width: 156px;">
									<p:ajax event="change" listener="#{eformBean.maritalStatusOnChangeListner}" process="@this" update="spouse,noOfChildren"></p:ajax>
									<f:selectItem itemLabel="Yes" itemValue="Yes" />
									<f:selectItem itemLabel="No" itemValue="No" />
								</p:selectOneMenu>
							</h:panelGroup>
							
							
							<h:outputLabel value="*" style="color : red;" />
							
							
							 <h:outputLabel value="Spouse Name" />   
							
							
							 
							 <p:inputText value="#{eformBean.newJoinee.spouseName}" id="spouse" disabled="#{not eformBean.FAMILY_DETAILS_RENDERER}"/>
							
							    
							<h:inputHidden />
							
							
							 <h:outputLabel value="No of Childrens" />
							
							
							 <p:inputMask value="#{eformBean.newJoinee.noOfChildrens}"  disabled="#{not eformBean.FAMILY_DETAILS_RENDERER}" mask="9" id="noOfChildren"></p:inputMask>
							
						    <h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Date of Joining" />
							<h:panelGroup>
							<p:calendar showButtonPanel="true"
								value="#{eformBean.newJoinee.dateOfJoining}" navigator="true" id="DOJ" yearRange="c,c+2" readOnlyInputText="true" pattern="dd-MMM-yyyy" >

							</p:calendar>
							 <p:watermark value="DD-MMM-YYYY" for="DOJ"></p:watermark>
							 </h:panelGroup>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Current Address" />
							<p:inputTextarea value="#{eformBean.newJoinee.currentAddress}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Permanent Address" />
							<p:inputTextarea value="#{eformBean.newJoinee.permanentAddress}" />


						</h:panelGrid>
						<h:panelGrid style="margin-top:-70px; margin-left:10px; color:red;">
							<h:messages errorClass="error" />
						</h:panelGrid>
					</h:panelGrid>
				</p:tab>

				<p:tab id="identification" title="Identification">
					<h:panelGrid columns="2">
						<h:panelGrid columns="4" style="text-align: left;"
							columnClasses="formLabelCell, formInputCell" cellpadding="8" cellspacing="8">
							
							<f:facet name="header">
								<h:outputLabel value="Identification Details"
									styleClass="outputTextTitleDesc" />
									<h:outputLabel style="float:right;font-size:12px;" value="Note:Please enter at least one Identification details."
									styleClass="outputTextSubTitle" />
							</f:facet>
							
						
							<h:outputLabel value="Permanent Account Number (PAN)" />
							<p:inputText value="#{eformBean.passportAndPANDetails.PANNumber}"
								/>
							<h:outputLabel value="Passport Number" />
							<p:inputText
								value="#{eformBean.passportAndPANDetails.passportNumber}"
								maxlength="10" />
							<h:outputLabel value="Pasport Issued Date" />
							<p:calendar showButtonPanel="true" navigator="true" yearRange="c-100:c+1"
								value="#{eformBean.passportAndPANDetails.passportIssueDate}" readOnlyInputText="true"
								pattern="dd-MMM-yyyy" maxlength="11">

							</p:calendar>
							<h:outputLabel value="Pasport Valid Upto" />
							<p:calendar showButtonPanel="true"
								value="#{eformBean.passportAndPANDetails.passportExpiryDate}" readOnlyInputText="true"
								pattern="dd-MMM-yyyy" maxlength="11" yearRange="c:c+100" navigator="true">
							</p:calendar>
							<h:outputLabel value="Pasport Issued Place" />
							<p:inputText 
								value="#{eformBean.passportAndPANDetails.passportIssuePlace}"
								></p:inputText>            


							
							<h:outputLabel value="Has your VISA ever been rejected?" />
							<p:selectOneMenu
								value="#{eformBean.passportAndPANDetails.VISAEverRejected}"
								style="width:160px;">
								<p:ajax listener="#{eformBean.visaRejectedBefore}" event="change" process="@this" update="visaRejectedDate,visaRejectedCountry,rejectedReason"></p:ajax>
								<f:selectItem itemLabel="Select Yes/No" itemValue="" />
								<f:selectItem itemLabel="Yes" itemValue="Yes" />
								<f:selectItem itemLabel="No" itemValue="No" />
								<p:ajax event="change"
									listener="#{eformBean.passportEverRejectedListner}"></p:ajax>
							</p:selectOneMenu>


							<h:outputLabel id="outputLabel" value="Date of rejection" />
							
							<p:calendar showButtonPanel="true" id="visaRejectedDate" navigator="true" readOnlyInputText="true" yearRange="c-100:c"
								value="#{eformBean.passportAndPANDetails.rejectDate}"
								pattern="dd-MMM-yyyy" disabled="#{not eformBean.VISA_REJECTED_BEFORE}" size="17">

							</p:calendar>
							
							<h:outputLabel value="For which country" />
							<p:inputText
								value="#{eformBean.passportAndPANDetails.rejectCountry}" id="visaRejectedCountry" disabled="#{not eformBean.VISA_REJECTED_BEFORE}"/>
							<h:outputLabel value="Reason" />
							<p:inputTextarea
								value="#{eformBean.passportAndPANDetails.rejectReason}" id="rejectedReason" disabled="#{not eformBean.VISA_REJECTED_BEFORE}"/>
							<h:outputLabel value="Driving License Number" />
							<p:inputText
								value="#{eformBean.passportAndPANDetails.drivinglicenseNumber}"
								 />
							<h:outputLabel value="Driving License Valid upto"/>
							<p:calendar showButtonPanel="true" navigator="true" yearRange="c:c+100" readOnlyInputText="true"
								value="#{eformBean.passportAndPANDetails.drivinglicenseValidity}"
								pattern="dd-MMM-yyyy">

							</p:calendar>

						</h:panelGrid>
						<h:panelGrid style="margin-top:-70px;margin-left:10px;color:red;">
							<h:messages errorClass="error" />
						</h:panelGrid>
					</h:panelGrid>
				</p:tab>
				<p:tab id="education" title="Education">
					<h:panelGrid columns="2">
						<h:panelGrid columns="6" cellpadding="6" cellspacing="6">
							<f:facet name="header">
								<h:outputLabel value="Education Details (Start from most recent)"
									styleClass="outputTextTitleDesc" />
									<h:outputLabel style="float:right;font-size:12px;" value="Note: New joinee should have 3 or more qualifications."
									styleClass="outputTextSubTitle"/>  
							</f:facet>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel
								value="Specialization " />
							<p:inputText value="#{eformBean.education.qualification}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Institution Name(School/College)" />
							<p:inputText
								value="#{eformBean.education.instituteSchoolCollage}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel
								value="University Name/Board Affiliated To" />
							<p:inputText value="#{eformBean.education.universityOrBoardName}" />
							<h:inputHidden />
                            	<h:outputLabel value="Student ID/Reg No" />
							<p:inputText value="#{eformBean.education.studentId}" />
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Period From" />
							<p:calendar showButtonPanel="true" navigator="true" yearRange="c-100:c+1"
								value="#{eformBean.education.periodFrom}" pattern="dd-MMM-yyyy" readOnlyInputText="true" maxlength="11">

							</p:calendar>
							<h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Period To" />
							<p:calendar showButtonPanel="true"  navigator="true" yearRange="c-100:c+1" readOnlyInputText="true"
								value="#{eformBean.education.periodTo}" pattern="dd-MMM-yyyy" maxlength="11">

							</p:calendar>
						    <h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="Program (Part Time / Full Time)" />
							<p:selectOneMenu value="#{eformBean.education.program}"
								style="width:160px;">
								<f:selectItem itemLabel="--Select--" itemValue="" />
								<f:selectItem itemLabel="Part Time" itemValue="Part Time" />
								<f:selectItem itemLabel="Full Time" itemValue="Full Time" />
							</p:selectOneMenu>
                            <h:outputLabel value="*" style="color : red;" />
							<h:outputLabel value="% Marks" />
							<h:panelGrid columns="2">
							<h:panelGroup>
							 <p:inputMask mask="99.99" value="#{eformBean.education.marks}"  id="Marks"></p:inputMask>
							 <p:watermark value="Ex: 75.50 or 75" for="Marks" ></p:watermark>
							 </h:panelGroup>
							 <h:outputText value="%" style="text-align:left;font-style:bold" />
							</h:panelGrid>
							<h:inputHidden  />
							<h:outputLabel
								value="Reasons for gap in Education (if any)" />
							<p:inputTextarea value="#{eformBean.education.gap}"></p:inputTextarea>
							<h:inputHidden />
							<h:inputHidden />
							
							<p:commandButton value="Add Education" ajax="false"
								action="#{eformBean.addToEducaitonCollector}">

							</p:commandButton>
						</h:panelGrid>
						<h:messages errorClass="error"
							style="color:red;font-size:12px;margin-left:30px;" />


					</h:panelGrid>
					<h:outputText value="Added Education Details"
						styleClass="outputTextSubTitle" />
					<p:outputPanel id="educationPanel">
						<p:dataTable  var="education"               
							value="#{eformBean.educationsList}"
							binding="#{eformBean.listToBeAssignedDatatable}">
							<p:column>
								<f:facet name="header">
									<h:outputText value="Qualification" />
								</f:facet>
								<h:outputText value="#{education.qualification}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Institute/School/College" />
								</f:facet>
								<h:outputText value="#{education.instituteSchoolCollage}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="University/Board" />
								</f:facet>
								<h:outputText value="#{education.universityOrBoardName}" />
							</p:column>

							<p:column>
								<f:facet name="header">
									<h:outputText value="Period From" />
								</f:facet>


								<h:outputText value="#{education.periodFrom}">
									<f:convertDateTime pattern="dd-MMM-yyyy" />
								</h:outputText>
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Period To" />
								</f:facet>


								<h:outputText value="#{education.periodTo}">
									<f:convertDateTime pattern="dd-MMM-yyyy"  />
								</h:outputText>
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Program" />
								</f:facet>
								<h:outputText value="#{education.program}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="% Marks" />
								</f:facet>
								<h:outputText value="#{education.marks}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Remove" />
								</f:facet>

								<p:commandButton icon="ui-icon-close" title="Remove from list"
									actionListener="#{eformBean.removeFromEducationList}"
									update="@form" style="padding: 0" />
							</p:column>

						</p:dataTable>
					</p:outputPanel>

				</p:tab>
				<p:tab id="reference" title="Reference">
					<h:panelGrid columns="4" style="text-align: left;"
						columnClasses="formLabelCell, formInputCell" cellpadding="6" cellspacing="6">
						<f:facet name="header">
							<h:outputLabel value="Reference Details"
								styleClass="outputTextTitleDesc" />
						</f:facet>
						<h:outputLabel value="Employee Code" />
						<p:inputText value="#{eformBean.reference.employeeCode}" />
						<h:outputLabel value="Employee Name" />
						<p:inputText value="#{eformBean.reference.employeeName}" />
						<h:outputLabel value="Organization Name" />
						<p:inputText value="#{eformBean.reference.organization}" />
						<h:outputLabel value="Organization Email" />
						<p:inputText value="#{eformBean.reference.email}"></p:inputText>
						<h:outputLabel value="Personal Email" />
						<p:inputText value="#{eformBean.reference.personalEmail}"></p:inputText>
						<h:outputLabel value="Contact Number" />
						<p:inputMask mask="(999)999999"
							value="#{eformBean.reference.contactNumber}" />
						<h:outputLabel value="Relationship" />
						<p:inputText value="#{eformBean.reference.relationship}" />
						<h:outputLabel value="Designation" />
						<p:inputText value="#{eformBean.reference.designation}" />

						<h:outputLabel value="Employer Address" />
						<p:inputTextarea value="#{eformBean.reference.address}"></p:inputTextarea>

                        	<h:inputHidden />
							<p:commandButton value="Add Reference" ajax="false"
								action="#{eformBean.addToReferenceCollector}">

							</p:commandButton>

					</h:panelGrid>
					
					<!-- COLLECTOR ADDED TO REFERENCE -->
					<h:outputText value="Added Reference Details"
						styleClass="outputTextSubTitle" />
				<p:scrollPanel style="width:950px;height:100px">		
					<p:outputPanel id="referencepanel">
						<p:dataTable id="referenceDetails" var="reference"
							value="#{eformBean.referencesList}"
							binding="#{eformBean.referenceListToBeAssignedToDatatable}">
							<p:column>
								<f:facet name="header">
									<h:outputText value="Employee Code" />
								</f:facet>
								<h:outputText value="#{reference.employeeCode}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Employee Name" />
								</f:facet>
								<h:outputText value="#{reference.employeeName}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Organization Name" />
								</f:facet>
								<h:outputText value="#{reference.organization}" />
							</p:column>
                            <p:column>
								<f:facet name="header">
									<h:outputText value="Designation" />
								</f:facet>
								<h:outputText value="#{reference.designation}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Organization Email" />
								</f:facet>


								<h:outputText value="#{reference.email}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Personal Email" />
								</f:facet>

                              <h:outputText value="#{reference.personalEmail}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Contact Number" />
								</f:facet>

                              <h:outputText value="#{reference.contactNumber}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Relationship" />
								</f:facet>
								<h:outputText value="#{reference.relationship}" />
							</p:column>
							<p:column>
								<f:facet name="header">
									<h:outputText value="Employeer Address" />
								</f:facet>
								<h:outputText value="#{reference.address}" />
							</p:column>
							
							<p:column>
								<f:facet name="header">
									<h:outputText value="Remove" />
								</f:facet>

								<p:commandButton icon="ui-icon-close" title="Remove from list"
									actionListener="#{eformBean.removeFromEducationList}"
									update="@form" />
							</p:column>

						</p:dataTable>
					</p:outputPanel>
					</p:scrollPanel>
					<!-- COLLECTOR ADDED -->
					
					
					
				</p:tab>
				<p:tab id="employment" title="Employment">
					<h:panelGrid columns="2">
						<h:panelGrid columns="6"
							columnClasses="formLabelCell, formInputCell">
							<f:facet name="header">
								<h:outputLabel value="Employment"
									styleClass="outputTextTitleDesc" />
							</f:facet>
							<h:outputText value="Name of the Organization" />
							<h:outputText value=":" />
							<p:inputText value="#{eformBean.employment.companyName}" />
							<h:outputText
								value="Address of the Organization" />
							<h:outputText value=":" />
							<p:inputTextarea value="#{eformBean.employment.address}"></p:inputTextarea>
							<h:outputText value="Employment type" />
							<h:outputText value=":" />
							<h:panelGroup>

								<p:selectOneMenu value="#{eformBean.employment.employmentType}"
									style="width:160px;">
									<f:selectItem itemLabel="Permanent" itemValue="Permanent" />
									<f:selectItem itemLabel="Contract" itemValue="Contract" />
								</p:selectOneMenu>

							</h:panelGroup>
							<h:outputText value="Designation / Position held" />
							<h:outputText value=":" />
							<p:inputText value="#{eformBean.employment.designation}" />
							<h:outputText
								value="Reported to(Name,  Position,  direct contact number)" />
							<h:outputText value=":" />
							<p:inputTextarea value="#{eformBean.employment.reportToContact}" ></p:inputTextarea>
							<h:outputText value="Period From" />
							<h:outputText value=":" />


							<p:calendar value="#{eformBean.employment.periodFrom}" showButtonPanel="true" navigator="true" yearRange="c-100,c+1" readOnlyInputText="true">

							</p:calendar>

							<h:outputText value="Period To" />
							<h:outputText value=":" />
							<p:calendar value="#{eformBean.employment.periodTo}" showButtonPanel="true" navigator="true" yearRange="c-100,c+1" readOnlyInputText="true">

							</p:calendar>

							<h:outputText
								value="Emp Code" />
							<h:outputText value=":" />
							<p:inputText value="#{eformBean.employment.employeeCode}" />
							<h:outputText value="Last drawn monthly gross salary(INR)" />
							<h:outputText value=":" />
							<p:inputText value="#{eformBean.employment.lastDrawn}" />
							<h:outputText value="Reason for Leaving" />
							<h:outputText value=":" />
							<p:inputText value="#{eformBean.employment.reasonOfLeaving}" />
							<h:outputText
								value="Mode of separation" />
							<h:outputText value=":" />

							<p:selectOneMenu value="#{eformBean.employment.modeOfSeperation}"
								style="width:160px;">
								<f:selectItem itemLabel="Resignation" itemValue="Resignation" />
								<f:selectItem itemLabel="Termination" itemValue="Termination" />
								<f:selectItem itemLabel="Absconded" itemValue="Absconded" />
								<f:selectItem itemLabel="Closed Operations"
									itemValue="Closed Operations" />
								<f:selectItem itemLabel="Others" itemValue="Others" />


							</p:selectOneMenu>
							<h:inputHidden />
							<h:inputHidden />
							<h:inputHidden />
							<h:inputHidden />
							<h:inputHidden />
							<h:panelGroup>
								<p:commandButton value="Add" ajax="false"
									action="#{eformBean.reinit}">

								</p:commandButton>
								<p:commandButton value="Reset" type="reset" />
							</h:panelGroup>


						</h:panelGrid>
						<h:panelGrid>
							<h:messages errorClass="error"
								style="color:red;font-size:12px;margin-left:30px;" />
						</h:panelGrid>

					</h:panelGrid>

					<p:scrollPanel style="width:850px;height:100px">
						<p:outputPanel id="employmentPanel">
							<p:dataTable var="employment" value="#{eformBean.employmentList}"
								binding="#{eformBean.employmentListToBeAssignedDatatable}">
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Company Name" />
									</f:facet>
									<h:outputText value="#{employment.companyName}" />
								</p:column>

								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Address" />
									</f:facet>
									<h:outputText value="#{employment.address}" />
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Employment type" />
									</f:facet>
									<h:outputText value="#{employment.employmentType}" />
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Designation / Position held" />
									</f:facet>
									<h:outputText value="#{employment.designation}" />
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Reported to" />
									</f:facet>
									<h:outputText value="#{employment.reportToContact}" />
								</p:column>

								<p:column>
									<f:facet name="header">
										<h:outputText value="Period From" />
									</f:facet>
									<h:outputText value="#{employment.periodFrom}">
										<f:convertDateTime pattern="dd-MMM-yyyy" />

									</h:outputText>
								</p:column>
								<p:column>
									<f:facet name="header">
										<h:outputText value="Period To" />
									</f:facet>
									<h:outputText value="#{employment.periodTo}">
										<f:convertDateTime pattern="dd-MMM-yyyy" />
									</h:outputText>
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Emp Code / Personnel No." />
									</f:facet>
									<h:outputText value="#{employment.employeeCode}" />
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Last drawn salary(INR)" />
									</f:facet>
									<h:outputText value="#{employment.lastDrawn}" />
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Reason for Leaving" />
									</f:facet>
									<h:outputText value="#{employment.reasonOfLeaving}" />
								</p:column>
								<p:column style="width:100px;">
									<f:facet name="header">
										<h:outputText value="Mode of separation" />
									</f:facet>
									<h:outputText value="#{employment.modeOfSeperation}" />
								</p:column>

								<p:column>
									<f:facet name="header">
										<h:outputText value="Remove" />
									</f:facet>

									<p:commandButton value="Remove"
										update=":formData:employmentPanel"
										process=":formData:employmentPanel">
										<p:collector value="#{employment}"
											removeFrom="#{eformBean.employmentList}"></p:collector>
									</p:commandButton>
								</p:column>

							</p:dataTable>
						</p:outputPanel>
					</p:scrollPanel>
					<p:commandButton value="Submit" onclick="emailConfirmationDiaglog.show()" update="@form" type="button" id="submit"
						></p:commandButton>

				</p:tab>


			</p:wizard>
			<p:confirmDialog widgetVar="emailConfirmationDiaglog" id="emailConfirmationDiaglog" severity="alert" message="Do you want to register new joinee ?">
				<h:panelGroup style="text-align: right; float: right;">
					<p:commandButton value="Yes, Register"  action="#{eformBean.saveEform}" update="@form" onclick="emailConfirmationDiaglog.hide()" oncomplete="mailStatusDialog.show()">
					</p:commandButton>
					<p:commandButton id="cancel" value="Cancel" onclick="emailConfirmationDiaglog.hide()" type="button" />
				</h:panelGroup>
			</p:confirmDialog>
			
			
			<p:confirmDialog widgetVar="eformCloseDiaglog" id="eformCloseDiaglog" severity="alert" message="New Joinee Registered Successfully">
				<h:panelGroup style="text-align: right; float: right;">
					<p:commandButton value="OK"  action="#{eformBean.refreshEform}" update="@form" onclick="eformCloseDiaglog.hide()"/>
					
				</h:panelGroup>
			</p:confirmDialog>
			
		</h:form>
	</ui:define>

</ui:composition>
